<header>
    <div class="wrapper">
        <h1>
            <a href="<?= base_url(); ?>" id="logo" target="_self" title="<?= $text->line('page.default.title'); ?>">
                <span>DC</span>arolino
            </a>
        </h1>
        <?php
            $uri = $this->uri->segment(2);
            $uri = (empty($uri)) ? $controller : $uri;
        ?>
        <nav>
            <ul id="top_nav">
                <li>
                    <a href="<?= base_url(); ?>br/<?= $uri; ?>" target="_self" title="<?= $text->line('lang.ptbr.subtitle'); ?>">
                        <?= $text->line('lang.ptbr'); ?>
                    </a>
                </li> 
                <li>
                    <a href="<?= base_url(); ?>es/<?= $uri; ?>" target="_self" title="<?= $text->line('lang.es.subtitle'); ?>">
                        <?= $text->line('lang.es'); ?>
                    </a>
                </li> 
                <li>
                    <a href="<?= base_url(); ?>en/<?= $uri; ?>" target="_self" title="<?= $text->line('lang.en.subtitle'); ?>">
                        <?= $text->line('lang.en'); ?>
                    </a>
                </li> 
                <li>
                    <a href="/<?= $text->line('page.contact.role'); ?>" target="_self" title="<?= $text->line('page.contact.title'); ?>">
                        <img src="/static/images/top_icon3.gif" alt="<?= $text->line('page.contact.title'); ?>" />
                    </a>
                </li>
                <li class="end">
                    <a href="<?= base_url(); ?>" target="_self" title="<?= $text->line('page.default.title'); ?>">
                        <img src="/static/images/top_icon1.gif" alt="<?= $text->line('page.default.title'); ?>" />
                    </a>
                </li>  
            </ul>
        </nav>
        <nav>
            <ul id="menu">
                <li <?= ($uri == $text->line('page.default.role')) ? 'id="menu_active"' : ''; ?>>
                    <a href="<?= base_url(); ?>" target="_self" title="<?= $text->line('page.default.name'); ?>">
                        <?= $text->line('page.default.name'); ?>
                    </a>
                </li>
                <li <?= ($uri == $text->line('page.about.role')) ? 'id="menu_active"' : ''; ?>>
                    <a href="/<?= $text->line('page.about.role'); ?>" target="_self" title="<?= $text->line('page.about.name'); ?>">
                        <?= $text->line('page.about.name'); ?>
                    </a>
                </li>
                <li <?= ($uri == $text->line('page.more.role')) ? 'id="menu_active"' : ''; ?>>
                    <a href="/<?= $text->line('page.more.role'); ?>" target="_self" title="<?= $text->line('page.more.name'); ?>">
                        <?= $text->line('page.more.name'); ?>
                    </a>
                </li>
                <li <?= ($uri == $text->line('page.blog.role')) ? 'id="menu_active"' : ''; ?>>
                    <a href="/<?= $text->line('page.blog.role'); ?>" target="_self" title="<?= $text->line('page.blog.name'); ?>">
                        <?= $text->line('page.blog.name'); ?>
                    </a>
                </li>
                <li <?= ($uri == $text->line('page.contact.role')) ? 'id="menu_active"' : ''; ?>>
                    <a href="/<?= $text->line('page.contact.role'); ?>" target="_self" title="<?= $text->line('page.contact.name'); ?>">
                        <?= $text->line('page.contact.name'); ?>
                    </a>
                </li>
            </ul>
        </nav>
    </div>
</header>
<div class="ic"></div>
